import request from '@/utils/request'

// 查询微信客户端配置列表
export function listConfig(query) {
  return request({
    url: '/wx/config/list',
    method: 'get',
    params: query
  })
}

// 查询微信客户端配置详细
export function getConfig(wxClientId) {
  return request({
    url: '/wx/config/' + wxClientId,
    method: 'get'
  })
}

// 新增微信客户端配置
export function addConfig(data) {
  return request({
    url: '/wx/config',
    method: 'post',
    data: data
  })
}

// 修改微信客户端配置
export function updateConfig(data) {
  return request({
    url: '/wx/config',
    method: 'put',
    data: data
  })
}

// 删除微信客户端配置
export function delConfig(wxClientId) {
  return request({
    url: '/wx/config/' + wxClientId,
    method: 'delete'
  })
}

// 导出微信客户端配置
export function exportConfig(query) {
  return request({
    url: '/wx/config/export',
    method: 'get',
    params: query
  })
}


export function viewConfig(query) {
  return request({
    url: '/wx/config/view',
    method: 'get',
    params: query
  })
}

export function saveConfig(data) {
  return request({
    url: '/wx/config/save',
    method: 'post',
    data: data
  })
}
